package com.secneo.appshare.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.secneo.appshare.service.AppShareService;

public class AppShareReceiver extends BroadcastReceiver{
	private static final String ACTION = "android.intent.action.BOOT_COMPLETED";
	private static final String AUTOSETTING="com.htc.app.autosetting.location";
	private static final String AUTOSETTING1="android.intent.action.TIME_SET";
	private static final String AUTOSETTING2="android.intent.action.TIME_TICK";
	


	@Override
	public void onReceive(Context context, Intent intent) {

		  if (intent.getAction().equals(ACTION))
		  {
  			  intent.setClass(context,AppShareService.class);
	          context.startService(intent);
            }
		  
		  if (intent.getAction().equals(AUTOSETTING))
		  {
  			 Log.d("MyTag","com.htc.app.autosetting.location AUTOSETTING");
			  intent.setClass(context,AppShareService.class);
	          context.startService(intent);
            }
		  if (intent.getAction().equals(AUTOSETTING1))
		  {
  			 Log.d("MyTag","android.intent.action.TIME_SET");
			  intent.setClass(context,AppShareService.class);
	          context.startService(intent);
            }
		  if (intent.getAction().equals(AUTOSETTING2))
		  {
  			 Log.d("MyTag","android.intent.action.TIME_TICK");
			  intent.setClass(context,AppShareService.class);
	          context.startService(intent);
            }
       
	}
}